Alphabetical Lingo reference

You can use all existing Lingo commands for digital video with QuickTime 3 media added using the QT3 Asset Xtra, with the following exceptions:

The new volumeLevel of sprite property replaces the existing volume of sprite property.
Instead of the existing movieRate of sprite property, use mRate of sprite.
Instead of the existing movieTime of sprite property, use MTime of sprite.

For a list of existing Lingo that works with digital video, lookup the keyword "digital video elements" in the index of Director's online Help.

The QT3 Asset Xtra provides the following new Lingo commands to control QuickTime cast members and sprites.


invertMask
Syntax: the invertMask of member whichQuickTimeMember
Type: Cast member property
Description: This property controls the way Director interprets a QuickTime movie's mask of member property. The invertMask property can have these values:
TRUE The QuickTime movie is drawn in the white pixels of the movie's mask.
FALSE The QuickTime movie is drawn in the black pixels of the movie's mask.
The invertMask property can be tested and set. The default value is FALSE.
Example: This handler reverses the current setting of the invertMask property of a QuickTime movie named "Starburst."
on toggleMask
	set the invertMask of member "Starburst" = not the invertMask of member "Starburst"
end
Related Lingo: mask of member property

loopBounds
Syntax: the loopBounds of sprite whichQuickTimeSprite
Type: Sprite property
Description: This property sets the internal loop points for a QuickTime 3 cast member or sprite. The loop points are specified as a Director list:
[startTime, endTime]
The startTime and endTime parameters must meet these requirements:
Both parameters must be integers that specify times in Director ticks.
The values must range from 0 to the duration of the QuickTime cast member.
The starting time must be less than the ending time.
If any of these requirements is not met, the QuickTime movie loops through its entire duration.
The loopBounds property has no effect if the movie's loop property is set to FALSE. If the loop property is set to TRUE while the movie is playing, the movie continues to play. Director uses these rules to decide how to loop the movie:
If the ending time specified by loopBounds is reached, the movie loops back to the starting time.
If the end of the movie is reached, the movie loops back to the start of the movie.
If the loop property is turned off while the movie is playing, the movie continues to play. Director stops when it reaches the ending time specified by loopBounds or the end of the movie, whichever comes first.
The loopBounds property can be tested and set. The default is [0,0].
Example: This sprite script sets the starting and ending times for looping within a QuickTime sprite. Notice that the times are set by specifying the number of seconds, which is then converted to ticks by multiplying by 60.
on beginSprite me
	set the loopBounds of sprite the spriteNum of me = [(16 * 60),(32 * 60)]
end

mask
Syntax: the mask of member whichQuickTimeMember
Type: Cast member property
Description: This property specifies a black-and-white (1-bit) cast member to be used as a mask for QuickTime media rendered direct-to-stage. The QuickTime media appears in the areas where the mask's pixels are black. The mask property allows you to take advantage of the performance advantages of a direct-to-stage digital video while playing a QuickTime 3 movie in a non-rectangular area. The mask of member property has no effect on non-direct-to-stage cast members.
Director always aligns the upper-left corner of the mask cast member with the upper-left corner of the QuickTime movie sprite. The mask cast member can't be moved and is not affected by the center or crop properties of its associated cast member.
For best results, set a QuickTime 3 cast member's mask property before any of its sprites appear on the stage. Setting or changing the mask property while the cast member is on the stage can have unpredictable results (for example, the mask might appear as a "freeze frame" of the digital video at the moment the mask property took effect).
Masking is an advanced feature; you may need to do some experimentation to achieve your goal.
The mask of member property can be tested and set. To remove a mask, set the mask of member property to VOID.
Note: Do not duplicate (using the Edit > Duplicate command) cast members for use as masks. Use copy-and-paste instead.

Example: This frame script sets a mask for a QuickTime 3 sprite before Director begins to draw the frame.
on prepareFrame
	set the mask of member "Peeping Tom" to member "Keyhole"
end
Related Lingo: invertMask of member property

mouseLevel
Syntax: the mouseLevel of sprite whichQuickTimeSprite
Type: Sprite property
Description: This property controls how Director passes mouse clicks on a QuickTime sprite to QuickTime. Without the QuickTime 3 Xtra, Director passes mouse clicks only on the QuickTime controller. The ability to pass mouse clicks within the sprite's bounding rectangle can be useful for interactive media such as QuickTime VR. The mouseLevel of sprite property can have these values:
#controller Pass clicks only on the movie controller to QuickTime. This is the standard behavior without the QuickTime 3 Xtra.
#all Pass all mouse clicks within the sprite's bounding rectangle to QuickTime.
#none Do not pass any mouse clicks to QuickTime.
The mouseLevel of sprite property can be tested and set. The default value is #controller.
Example: This frame script checks to see if the name of the QuickTime sprite in channel 5 contains the string "QTVR." If it does, it sets the mouseLevel to #all; otherwise, it sets the mouseLevel to #none.
on prepareFrame
	if the name of member (the memberNum of sprite 5) contains "QTVR" then
		set the mouseLevel of sprite 5 = #all
	else
		set the mouseLevel of sprite 5 = #none
	end if
end

QuickTimeVersion()
Syntax: QuickTimeVersion()
Type: Function
Description: This function returns a floating-point value that identifies the current installed version of QuickTime. It is intended as a more useful replacement to the current QuickTimePresent function.
Windows users: If there are multiple versions of QuickTime 3.0 or later installed, QuickTimeVersion() returns the latest version. If a version before QuickTime 3.0 is installed, QuickTimeVersion() returns 2.1.2 regardless of the version installed.
Example: This startMovie handler uses QuickTimeVersion() to check whether QuickTime 3 is installed. If QuickTime 3 is installed, the playback head branches to a frame containing a splash screen containing a QuickTime 3 video. If QuickTime 3 is not installed, the playback head branches to a splash screen that employs traditional Director animation.
on startMovie
	if QuickTimeVersion() >= 3 then
		go to frame "SplashVideo"
	else
		go to frame "SplashAnimated"
	end if
end

rotation
Syntax: the rotation of member whichQuickTimeMember
the rotation of sprite whichQuickTimeSprite
Type: Cast member property; sprite property
Description: This property controls the rotation of a QuickTime 3 sprite. This property does not rotate the sprite's bounding rectangle or the sprite's controller. Instead, it rotates the image around the image's center point within the sprite's bounding rectangle.
If the sprite's crop property is set to TRUE, rotating the sprite frequently moves part of the image out of the viewable area; when the sprite's crop property is set to FALSE, the image is scaled to fit within the bounding rectangle (which may cause image distortion).
You specify the rotation in degrees. The rotation property can be tested and set. The default value is 0.
Example: This frame script keeps the playback head looping in the current frame while it rotates a QuickTime sprite in channel 5 a full 360 degrees in 16-degree increments. When the sprite has been rotated 360 degrees, the playback head continues to the next frame.
on exitFrame
	if the rotation of sprite 5 < 360 then
		set the rotation of sprite 5 = the rotation of sprite 5 + 16
		go to the frame
	end if
end

scale
Syntax: the scale of member whichQuickTimeMember
the scale of sprite whichQuickTimeSprite
Type: Cast member property; sprite property
Description: This property controls the scaling of a QuickTime 3 sprite. This property does not scale the sprite's bounding rectangle or the sprite's controller. Instead, it scales the image around the image's center point within the bounding rectangle. The scaling is specified as a Director list containing two percentages:
[xPercent, yPercent]
The xPercent parameter specifies the amount of horizontal scaling; the yPercent parameter specifies vertical scaling.
When the sprite's crop property is set to TRUE, the scale property can be used to simulate zooming within the sprite's bounding rectangle. When the sprite's crop property is set to FALSE, the scale property is ignored.
The scale property can be tested and set. The default value is [100.0000,100.0000].
Example: This frame script keeps the playback head looping in the current frame while it zooms out, in 10-percent increments, on a QuickTime sprite in channel 5. When the sprite is no longer visible (because its scale is 0 percent or less), the playback head continues to the next frame.
on exitFrame
	set scaleFactor = getAt(the scale of sprite 5, 1)
	if scaleFactor > 0 then
		set scaleFactor = scaleFactor -.1
		set the scale of sprite 5 = [scaleFactor, scaleFactor]
		go to the frame
	end

translation
Syntax: the translation of member whichQuickTimeMember
the translation of sprite whichQuickTimeSprite
Type: Cast member property; sprite property
Description: This property controls the offset of a QuickTime 3 sprite's image within the sprite's bounding box. This offset is expressed in relation to the sprite's default location, as set by its center property. When center is set to TRUE, the sprite is offset relative to the center of the bounding rectangle; when center is set to FALSE, the sprite is offset relative to the upper-left corner of the bounding rectangle. The offset is set as a Director list:
[xTrans, yTrans]
The xTrans parameter specifies the horizontal offset, in pixels, from the sprite's default location; the yTrans parameter specifies the vertical offset. You can specify offsets as positive or negative integers.
When the sprite's crop property is set to TRUE, the translation property can be used to mask portions of the QuickTime movie by moving them outside the bounding rectangle. When the crop property is set to FALSE, the translation property is ignored and the sprite is always positioned at the upper-left corner of the sprite's rectangle.
The translation property can be tested and set. The default is [0,0].
Example: This frame script assumes that the center property of a 320-pixel-wide QuickTime 3 sprite in channel 5 is set to FALSE. It keeps the playback head in the current frame until the movie's horizontal translation point has moved to the right edge of the sprite, in 10-pixel increments. This has a "wipe right" effect, moving the sprite out of view to the right. When the sprite is out of view, the playback head continues to the next frame.
on exitFrame
	set horizontalPosition = getAt(the translation of sprite 5, 1)
	if horizontalPosition < 320 then
		set the translation of sprite 5 = [(the translation of sprite 5) + 10, 0]
		go to the frame
	end

volumeLevel
Syntax: the volumelevel of sprite whichQuickTimeSprite
Type: Sprite property
Description: This property controls the sound volume of a QuickTime sprite. You can set the sound level from 0 (mute) to 256 (full volume). The volumeLevel property can be tested and set.
The volumeLevel property replaces the existing volume of sprite property for use with QuickTime 3 media.
Example: This frame script assumes that the volumeLevel of the QuickTime 3 sprite in channel 5 is currently set to 0. It gradually fades the volume up in increments of 16 to the maximum of 256 while keeping the playback head looping in the current frame. When the sound is at 256 (full volume), the playback head continues to the next frame
on exitFrame
	if the volumeLevel of sprite 5 < 256 then
		set the volumeLevel of sprite 5 = the volumeLevel of sprite 5 + 16
		go to the frame
	end if
end